﻿<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<IList<Complaint.Models.Dtos.Complaint>>" %>

<%@ Import Namespace="Complaint.Common" %>
<h4>
    Latest complaints</h4>
<ul>
    <%
    if (Model.Count == 0)
    {%>
        <li>No complaints found</li>
<%  }
    else
    {
        foreach (var complaint in Model)
        {%>
    <li><a href="<%= Url.Content(String.Format("~/Complaint/Details/{0}", complaint.ComplaintID)) %>"
        title="<%= complaint.Title %>">
        <%= complaint.Title.ToShorter(ConfigHelper.GetConfigValueAsInt("LeftNavMenuWidth"))%></a></li>
    <%  }
    }%>
</ul>
